//package com.bitcoin.scheduler.config;
//
//import com.bitcoin.scheduler.service.HbaseService;
//import org.apache.hadoop.hbase.HBaseConfiguration;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.List;
//import java.util.Map;
//import java.util.Set;
//
//@Configuration
//@EnableConfigurationProperties(ApplicationProperties.class)
//public class HBaseConfig {
//
//    private final ApplicationProperties properties;
//
//    public HBaseConfig(ApplicationProperties properties) {
//        this.properties = properties;
//    }
//
//    @Bean
//    public HbaseService hBaseService() {
//        return new HbaseService(configuration());
//    }
//
//    public org.apache.hadoop.conf.Configuration configuration() {
//
//        org.apache.hadoop.conf.Configuration configuration = HBaseConfiguration.create();
//
//        Map<String, String> hbaseConfig = properties.getHbase();
//        Set<String> keySet = hbaseConfig.keySet();
//        for (String key : keySet) {
//            configuration.set(key, hbaseConfig.get(key));
//        }
//
//        return configuration;
//    }
//}
//
